// This unit has being modularized from original implementation
// This unit contains ONLY the minimal functionality required to compile

Unit System;

{$LongStrings  ON}
{$IOChecks     OFF}
{$RangeChecks  OFF}
{$Optimization ON}
{$StackFrames  OFF}

// Suppress assertion for release version
{$IFDEF RELEASE}
{$DEBUGINFO OFF}
{$ASSERTIONS OFF}
{$ENDIF}

{$Include BaseRTL.inc}

Interface

// Compiler constants
 Const
  RTLVersion = 22.00;

{$EXTERNALSYM CompilerVersion}

{$DEFINE Include_Modules_Header}

 {$Include System.RTTI.pas}
 {$Include System.Types.pas}
 {$Include System.Set.pas}
 {$Include System.Int64.pas}
 {$Include System.Utils.pas}
 {$Include System.Logging.pas}
 {$Include System.Processor.pas}
 {$Include System.Error.pas}
 {$Include System.Exception.pas}
 {$Include System.MemoryManager.pas}
 {$Include System.Threading.pas}
 {$Include System.Modular.pas}
 {$Include System.Modular.EXE.pas}
 {$Include System.Modular.DLL.pas}
// {$Include System.Coverage.pas}
 {$Include System.Extension.pas}
 {$Include System.Resource.pas}
 {$Include System.Resource.InitImport.pas}
 {$Include System.ShortString.pas}
 {$Include System.ANSIString.pas}
 {$Include System.WideString.pas}
 {$Include System.UnicodeString.pas}
 {$Include System.StringConv.pas}
// {$Include System.Variant.pas}
// {$Include System.Array.pas}
// {$Include System.Record.pas}
 {$Include System.GUID.pas}
// {$Include System.File.pas}
// {$Include System.TextFile.pas}
// {$Include System.Console.pas}
// {$Include System.ObjectInterface.pas}
 {$Include System.WinAPI.pas}

{$UNDEF Include_Modules_Header}

 Procedure _RTL_FirstChanceInit;

Implementation
{$DEFINE Include_Modules_Implement}

 Uses
  SysInit;

 {$Include System.Types.pas}
 {$Include System.WinAPI.pas}
 {$Include System.RTTI.pas}
 {$Include System.Utils.pas}
 {$Include System.Set.pas}
 {$Include System.Int64.pas}
 {$Include System.GUID.pas}
 {$Include System.Logging.pas}
 {$Include System.Processor.pas}
 {$Include System.Error.pas}
 {$Include System.Exception.pas}
 {$Include System.MemoryManager.pas}
 {$Include System.Threading.pas}
 {$Include System.Modular.pas}
 {$Include System.Modular.EXE.pas}
 {$Include System.Modular.DLL.pas}
// {$Include System.Coverage.pas}
 {$Include System.Extension.pas}
 {$Include System.Resource.pas}
 {$Include System.Resource.InitImport.pas}
 {$Include System.ShortString.pas}
 {$Include System.ANSIString.pas}
 {$Include System.WideString.pas}
 {$Include System.UnicodeString.pas}
 {$Include System.StringConv.pas}

{$UNDEF Include_Modules_Implement}

 Var
  _INT_FirstChanceInit: Boolean = False;

 Procedure _RTL_FirstChanceInit;
  BEGIN
   IF NOT _INT_FirstChanceInit then
    BEGIN
     _INT_Utils_Init;
     _INT_Logging_Init;
     _INT_Error_Init;
     _INT_Exception_Init;
     _INT_Modular_Init;
     _INT_Modular_DLL_Init;
     _INT_Resource_Init;
     _INT_StringConv_Init;

     _INT_FirstChanceInit:= True;
    END;
  END;

Initialization
{$DEFINE Include_Modules_Initialize}

 {$Include System.Types.pas}
 {$Include System.WinAPI.pas}
 {$Include System.Utils.pas}
 {$Include System.Set.pas}
 {$Include System.Int64.pas}
 {$Include System.Logging.pas}
 {$Include System.Processor.pas}
 {$Include System.Exception.pas}
 {$Include System.Error.pas}
 {$Include System.RTTI.pas}
 {$Include System.GUID.pas}
 {$Include System.MemoryManager.pas}
 {$Include System.Threading.pas}
 {$Include System.Modular.pas}
 {$Include System.Modular.EXE.pas}
 {$Include System.Modular.DLL.pas}
// {$Include System.Coverage.pas}
 {$Include System.Extension.pas}
 {$Include System.Resource.pas}
 {$Include System.Resource.InitImport.pas}
 {$Include System.ShortString.pas}
 {$Include System.ANSIString.pas}
 {$Include System.WideString.pas}
 {$Include System.UnicodeString.pas}
 {$Include System.StringConv.pas}

{$UNDEF Include_Modules_Initialize}

Finalization
{$DEFINE Include_Modules_Finalize}

 {$Include System.StringConv.pas}
 {$Include System.UnicodeString.pas}
 {$Include System.WideString.pas}
 {$Include System.ANSIString.pas}
 {$Include System.ShortString.pas}
 {$Include System.Resource.InitImport.pas}
 {$Include System.Resource.pas}
 {$Include System.Extension.pas}
// {$Include System.Coverage.pas}
 {$Include System.Modular.DLL.pas}
 {$Include System.Modular.EXE.pas}
 {$Include System.Modular.pas}
 {$Include System.Threading.pas}
 {$Include System.MemoryManager.pas}
 {$Include System.GUID.pas}
 {$Include System.RTTI.pas}
 {$Include System.Error.pas}
 {$Include System.Exception.pas}
 {$Include System.Processor.pas}
 {$Include System.Logging.pas}
 {$Include System.Utils.pas}
 {$Include System.Int64.pas}
 {$Include System.Set.pas}
 {$Include System.WinAPI.pas}
 {$Include System.Types.pas}

{$UNDEF Include_Modules_Finalize}

END.

